<?php
namespace Home\Controller;

/**
 * 客栈数据交互接口
 * @modify trainyao 2015-12-31 创建
 */

class HotelPageController extends \Home\Controller\ParentController
{

    /**
     * 支付方式设置页面
     * @modify AmosZhong 2016-01-06 创建
     */
    public function pay() {
        $param = I('get.');

        $hotelId = $param['hotel'];

        $hotelLogic = A('Common/Hotel', 'Logic');
        $hotelPayData = $hotelLogic->getHotelPay($hotelId, false, null, true);
        $hotelNoteData = $hotelLogic->getHotelNote($hotelId);
        $hotelOtherCostData = $hotelLogic->getHotelOtherCost($hotelId);

        $this->assign('hotelNote', $hotelNoteData);
        $this->assign('hotelCost', $hotelOtherCostData);
        $this->assign('hotelpay', $hotelPayData);
        $this->assign('deletable', RESOURCE_DELETABLE);

        $this->display();
    }

    public function setting() {
        $param = I('get.');

        $hotelId = $param['hotel'];

        $hotelLogic = A('Common/Hotel', 'Logic');
        $hotelPayData = $hotelLogic->getHotelPay($hotelId, false, null, true);
        $hotelNoteData = $hotelLogic->getHotelNote($hotelId);
        $hotelOtherCostData = $hotelLogic->getHotelOtherCost($hotelId);
        $hotelRoomCostData = $hotelLogic->getCheckRoomCost($hotelId);

        $this->assign('hotelRoomCost', $hotelRoomCostData);
        $this->assign('hotelNote', $hotelNoteData);
        $this->assign('hotelCost', $hotelOtherCostData);
        $this->assign('hotelpay', $hotelPayData);
        $this->assign('deletable', RESOURCE_DELETABLE);

        $this->display();
    }
    /**
     * 分销渠道设置页面
     * @modify AmosZhong 2016-01-06 创建
     */
    public function channel() {
        $param = I('get.');

        $hotelId = $param['hotel'];

        $hotelLogic = A('Common/Hotel', 'Logic');
        $hotelChannelData = $hotelLogic->getHotelChannel($hotelId, false);

        $this->assign('hotelchannel', $hotelChannelData);
        $this->assign('deletable', RESOURCE_DELETABLE);
        $this->display();
    }

    /**
     * 对账页面
     * @modify AmosZhong 2016-05-16 创建
     */
    public function reconciliation() {
        $this->display();
    }

    /**
     * 订单处理退款页面
     * @modify AmosZhong 2016-05-16 创建
     */
    public function refund() {
        $this->display();
    }
}
